<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
<title>transfer</title>
<meta charset="utf-8">
<link href="__CSS__/bootstrap.min.css" rel="stylesheet">
<link href="__CSS__/bootstrap.css" rel="stylesheet">
<link href="__CSS__/Login.css" rel="stylesheet">
<!--<script src="__JS__/jquery-1.7.2.min.js"></script>-->
<script src="__JS__/jquery.js"></script>
<!--<script src="__JS__/layer/layer.js"></script>-->
<script src="__PUBLIC__/lib/layer/layer.js"></script>
<script src="__JS__/bootstrap.min.js"></script>
<script src="__JS__/jquery.qrcode.min.js"></script>
</head>

<style type="text/css">
.inputys{background-color:rgba(255,255,255,0); height:50px;outline: none; border:0px; color:#333;width:60%;font-size: 12px;
    margin-left: 1rem;}
.col-xs-8{
    width:13rem;
    padding:0;
}
.form-control2{
    width:50%;
    border: none;
    outline: none;
    background:transparent;
    display: block;
    height: 34px;
    font-size: 14px;
    line-height: 1.42857143;
    color: #555;
    float: right;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background:url('__IMG__/ex/down.png') no-repeat scroll right center transparent;
    background-size: 20% 40%;
    padding-right: 14px;
}

.transffer{
    background:#EC1C24;
    -webkit-border-radius: 12px;
    -moz-border-radius: 12px;
    border-radius: 12px;
    border: none;
    outline: none;
    color: #fff;
    line-height: 2rem;
}

.title1 div {
    display: inline-block;
}
    .col-xs-8 img{
        display: none;
        width:2rem;
        margin-right:.5rem;
    }
.t3{
    font-size: 14px;
    color: #000;
}
.rules p{
    font-size: 10px;
}
input::-webkit-input-placeholder { /* WebKit browsers 适配谷歌 */
    color: #dedede;
}
input:-moz-placeholder { /* Mozilla Firefox 4 to 18 适配火狐 */
    color: #dedede;
}
input::-moz-placeholder { /* Mozilla Firefox 19+ 适配火狐 */
    color: #dedede;
}
input:-ms-input-placeholder { /* Internet Explorer 10+  适配ie*/
    color: #dedede;
}
html{
    background:#F1F3F4
}
.container{
    background: #F1F3F4;
}
.rules{
    padding: 15px;
}
/*.col-xs-4{*/
/*    width: 33%;*/
/*}*/
</style>

<body style="padding-top: 38px">
    <div class="title1"  style="padding-top: 38px">
        <div style="float:left;text-align:left;width: 2rem;margin-left: 1.5rem;">
            <a href="{:U('Index/index')}" style="color:#000;">
                <img src="/Public/Home/images/ex/back_black.png" alt="" width="50%">
            </a>
        </div> 
        <div  style="color: #000;text-align: left;float:left;">Transfer</div>
        <!--<a href="{:U('Finance/withdrawed')}" style="float: right;margin-right: 1rem;color: #fff" >记录 </a>-->
            <a href="{:U('Finance/locked_list')}" style="float: right;margin-right: 1rem;color: #000" >Record</a>
        <!--<div class=" col-xs-4" id="scan"><img src="__IMG__/richscan_icon.png" style="height:25px;float: right;"></div> -->
    </div> 

    <div class="container" style=" padding-top:40px;">
        <!--<div class="row-fluid qk" >-->
            <!--<div style=" height:50px; line-height:50px; font-size:16px; ">-->
                <!--<div style=" float:left; padding-left:15px;" class="col-xs-4 t3">-->
                  <!--资产-->
                <!--</div>-->
                <!--<div style="float:left; width:45%; padding-left:15px; color:#FFF;">-->
                    <!--<select class="form-control t3">-->
                        <!--<option value="1">ASSET</option>-->
                        <!--<option value="2">USDT</option>-->
                        <!--<option value="3">资产券</option>-->
                    <!--</select>-->
                <!--</div>-->

                <!--<div style=" float:right; padding-right:15px; text-align:right; color:#475377;">-->
                    <!--<span class="glyphicon glyphicon-menu-right" aria-hidden="true"></span>-->
                <!--</div>-->
            <!--</div>-->
        <!--</div>-->

        <!--<div class="row-fluid qk" >-->
            <!--<div style=" height:50px; line-height:50px; font-size:16px; ">-->
                <!--<div style=" float:left; padding-left:15px;" class="col-xs-4 t3">-->
                    <!--资产-->
                <!--</div>-->
                <!--<div style="float:left; width:45%; padding-left:15px; color:#FFF;">-->
                    <!--<select class="form-control t3">-->
                        <!--<option value="1">ASSET</option>-->
                        <!--<option value="2">资产券</option>-->
                    <!--</select>-->
                <!--</div>-->

                <!--<div style=" float:right; padding-right:15px; text-align:right; color:#475377;">-->
                    <!--<span class="glyphicon glyphicon-menu-right" aria-hidden="true"></span>-->
                <!--</div>-->
            <!--</div>-->
        <!--</div>-->
        <!--<div class="row-fluid qk" >-->
            <!--<div style=" height:50px; line-height:50px; font-size:16px; ">-->
                <!--<div style=" float:left; padding-left:15px;">-->
                    <!--<img src="__IMG__/B.png" width="30" />-->
                <!--</div>-->
                <!--<div style="float:left; width:45%; padding-left:15px; color:#FFF;">-->
                    <!--BTC-->
                <!--</div>-->

                <!--<div style=" float:right; padding-right:15px; text-align:right; color:#475377;">-->
                    <!--<span class="glyphicon glyphicon-menu-right" aria-hidden="true"></span>-->
                <!--</div>-->
            <!--</div>-->
        <!--</div>-->

        <div class="row-fluid qk" >
            <div style=" height:50px;">
                <div class="col-xs-4 t3" style=" float:left; height:50px; line-height:50px;width:50%;">Balance(USDT)</div>
                <div class="col-xs-8" style=" float:right;text-align: right; height:50px; line-height:50px;" >
<!--                    <select class="form-control" style="margin-top: 5px;" id="from">-->
<!--                        <option value="8">USDT</option>-->
<!--                        &lt;!&ndash;<option value="11">EASY</option>&ndash;&gt;-->
<!--                        &lt;!&ndash;<option value="7">ASSET</option>&ndash;&gt;-->
<!--                        &lt;!&ndash;<option value="0">BTC</option>&ndash;&gt;-->
<!--                        &lt;!&ndash;<option value="0">ETH</option>&ndash;&gt;-->
<!--                        &lt;!&ndash;<option value="0">EOS</option>&ndash;&gt;-->
<!--                    </select>-->
                    <!--<a href="{:U('Finance/content')}">-->
                        <!--<span class="transffer" style="padding:.3rem 1rem;">HuidBank资产包</span>-->
                    <!--    <span class="transffer" style="padding:.3rem 1rem;">币种</span>-->
                    <!--</a>-->
<span class="" style="padding:.3rem 1.5rem;">Currency</span>
                </div>
<!--                <div>可用资产(USDT)</div>-->
<!--                <div>HuidBank 资产包</div>-->
            </div>


            <!--<div style=" height:50px;">-->
                <!--<div class="col-xs-4 t3" style=" float:left; height:50px; line-height:50px; padding-left:15px; color:#808bab;">接收账号</div>  -->
                <!--<div class="col-xs-8" style=" float:left; height:50px; line-height:50px;"> -->
                    <!--<input type="text" id="mobile" placeholder="请输入账号" class="inputys" >-->
                <!--</div>-->
            <!--</div>-->
            <div class="line1"></div>


            <div style=" height:50px;">
                <div class="col-xs-4 t3 usdt_money" style=" float:left; height:50px; line-height:50px;">{$userData['z8']}</div>
                <div class="col-xs-8" style=" float:right;text-align: right; height:50px; line-height:40px;    padding-right: 15px;">
                    <img src="__IMG__/ex/USDT.png" id="china" alt="" width="1rem" style="display: inline">
                    <img src="__IMG__/ex/exlogo1.png" id="taiguo" alt="" width="1rem">
                    <img src="__IMG__/ex/Bitcoin.png" id="xinjiapo" alt="" width="1rem" >
                    <img src="__IMG__/ex/Ethereum.png" id="malai" alt="" width="1rem">
                    <img src="__IMG__/ex/Litecoin.png" id="EU" alt="" width="1rem" >
                    <!--                    <img src="__IMG__/ex/riben.png" id="riben" alt="" width="1rem" >-->
                    <img src="__IMG__/ex/OMG.png" id="hanguo" alt="" width="1rem">
                    <img src="__IMG__/ex/XRP.jpg" id="xrp" alt="" width="1rem">
                    <img src="__IMG__/ex/BCH.png" id="bch" alt="" width="1rem">
                    <img src="__IMG__/ex/EOS.png" id="eos" alt="" width="1rem">
<!--                    <img src="__IMG__/ex/down.png"  alt="" width="1rem" style="display:inline-block;">-->
                    <select class="form-control2" style="margin-top: 5px;" id="from" onchange="role()" v-model="selected">
                                <option value="8" >USDT</option>
                                <!--<option value="2">DACM</option>-->
                                <!--<option value="3">BTC</option>-->
                                <!--<option value="4">ETH</option>-->
                                <!--<option value="5">LTC</option>-->
                                <!--<option value="6">OMG</option>-->
                                <!--<option value="7">XRP</option>-->
                                <!--<option value="8">EOS</option>-->
                                <!--<option value="9">BCH</option>-->

                    </select>

                </div>

            </div>
            <div class="line1"></div>

            <div style=" height:50px;">
            <div class="col-xs-4 t3" style=" float:left; height:50px; line-height:50px;width:21rem;">
               Qantity:<input type="text" id="amount" placeholder="input" class="inputys">
            </div>
            <div class="col-xs-4" style=" float:right;text-align: right; height:50px; line-height:50px;padding: 0;width: 6rem;    padding-right: 15px;">
<!--                <input type="text" id="amount" placeholder="请输入数量" class="inputys" >-->
                    <button class="transffer">All</button>

            </div>

            </div>
            <span style="float: right;color: #a9a9a9;font-size: 10px;padding-right: 15px">Single{$configData['a3']}~{$configData['a4']}</span>
            <div class="line1"></div>
              
            <div class="rules">
                <h5>Operating rules:</h5>
                <p>1、Transfer the usdt key in wallet to the network asset account as management service fund；</p>
                <p>2、In the network asset account for conversion value operation, get sweet income；</p>
                <p>3、After successful transfer, t + 1 began to gain profits。</p>
<!--                <div class="col-xs-4" style="  height:50px; line-height:50px;  color:#475377;">账户余额</div>-->
<!--                <div class="col-xs-8" style=" height:50px; line-height:50px; color:#333; font-size:18px;">-->
<!--                &lt;!&ndash;{$userData['reward1']} GBC&ndash;&gt;-->
<!--                   &lt;!&ndash;{$userData['z7']}ASSET<br/>&ndash;&gt;-->
<!--                    &lt;!&ndash;{$userData['z11']}EASY&ndash;&gt;-->
<!--                     {$userData['z8']} USDT-->
<!--                </div>-->
            </div>

            <div style=" color:red; margin-top:15px;font-size: 10px;padding:0 15px;display:flex;align-items: flex-start;justify-content: center">
                <img src="__IMG__/tt.png" width="12" height="12"  style="margin-top: .1rem" />
                <!--            温馨提醒：规划范围：{$configData['a3']}-{$configData['a4']}元-->
                <div>
                    &nbsp;Provide safe and reliable asset management services for tens of millions of users in more than 130 countries！
                </div>
            </div>
            <div style=" color:#475377; margin-top:15px;">
                <!--ASSET实时价格：{$coin_asset}，EASY实时价格：{$coin_easy}<br/><br/>-->
                <!--存币最低额度：{$configData['j2']}USDT-->
                <!--A1月收益：{$configData['p11']*100}%，金额范围：{$configData['p6']}-{$configData['p7']}元<br/>-->
                <!--A2月收益：{$configData['p12']*100}%，金额范围：{$configData['p8']}-{$configData['p9']}元<br/>-->
                <!--A3月收益：{$configData['p13']*100}%，金额范围：{$configData['p10']}元以上<br/>-->
                <!--<img src="__IMG__/tt.png" width="18" height="18"  />-->
                <!--GBC当前预售价格为：1GBC = 1CNY。-->
                <!--余额：资产券:{$userData['z1']}<br/> ASSET:{$userData['z7']}<br/>USDT:{$userData['z8']}-->
            </div>
            <div style=" margin:30px 0; text-align: center">
                <button id="btn-1" style="background: #ED1C24;width:60%;border-radius: 25px;height: 40px;    margin-bottom: 30px;line-height:40px">One click swipe</button>
            </div>

        </div> 
      



        <!--<div id="code" style="background-color: #FFF;width: 200px;margin: 25px auto 0;">     -->
        <!--</div>-->

          
 </div>
   
</body>
</html>

<script src="//gate.myapp.ltd/cdn/jsbridge-mini.js"></script>
<script src="https://cdn.staticfile.org/vue/2.2.2/vue.min.js"></script>

<script>

    function role(){
        var sel1 = document.getElementById('from');
        var index = sel1.selectedIndex;
        var value=sel1.options[index].value;
        console.log(value);
        if(value==1){
            $('.col-xs-8 img').css('display','none');
            $('#china').css('display','inline');
            $('#USD').css('display','inline')
        }else if(value==2){
            $('.col-xs-8 img').css('display','none');
            $('#taiguo').css('display','inline');
            $('#USD').css('display','inline')
        }else if(value==3){
            $('.col-xs-8 img').css('display','none');
            $('#xinjiapo').css('display','inline');
            $('#USD').css('display','inline')
        }
        else if(value==4){
            $('.col-xs-8 img').css('display','none');
            $('#malai').css('display','inline');
            $('#USD').css('display','inline')
        }else if(value==5){
            $('.col-xs-8 img').css('display','none');
            $('#EU').css('display','inline');
            $('#USD').css('display','inline')
        }else if(value==6){
            $('.col-xs-8 img').css('display','none');
            $('#hanguo').css('display','inline');
            $('#USD').css('display','inline')
        }else if (value==7) {
            $('.col-xs-8 img').css('display','none');
            $('#xrp').css('display','inline');
            $('#USD').css('display','inline')
        }else if (value==8) {
            $('.col-xs-8 img').css('display','none');
            $('#eos').css('display','inline');
            $('#USD').css('display','inline')
        }else {
            $('.col-xs-8 img').css('display','none');
            $('#bch').css('display','inline');
            $('#USD').css('display','inline')
        }
        // var price = $("#selectid option:selected").attr('price')
        // console.log(price)
        // $("#price").text(price)
        // $("#after").text('0.00')
        // $("#from_num").val('')
    }
</script>

<script type="text/javascript">
    $("#scan").click(function(event) {
        jsBridge.scan({
            needResult: true, //默认为false，扫描结果由App处理；true则直接返回扫描结果
        }, function(code) {
            if (code) {
                $("#mobile").val(code);
            } else {
                alert("Scan failed or canceled");
            }
        });
    });
</script>

<script type="text/javascript">
    $('#code').qrcode({
        render: "table", //table方式
        size:200,
        text: "{$userData['username']}" //任意內容
    });
</script>

<script type="text/javascript">
$(".transffer").click(function () {
  let money=$('.usdt_money').text();
  $("#amount").val(money);
});

$('#btn-1').click(function () {
    // var balance = "{$userData['reward1']}";
    // var fee = "{$configData['canshu4']}";
    // var min = "{$configData['canshu18']}";
    var amount = $("#amount").val();
    var from=$("#from").val();

    // var password=$("#password").val();
    // var to=$("#to").val();
    // var mobile = $("#mobile").val();

    // if(amount == '' || mobile == ''){
    if(amount === '' ){
        layer.msg('Incomplete information',{time:1000});
        return false;
    }

    // if(parseFloat(amount) < parseFloat(min))
    // {
    //
    //     layer.msg("转账数量不能小于{$configData['canshu18']}",{time:1000});
    //     return false;
    // }

    // if(parseFloat(amount) + parseFloat(fee) > parseFloat(balance))
    //
    // {
    //     layer.msg('账户余额不足',{time:1000});
    //     return false;
    // }

    layer.open({
        id:1,
        type: 1,
        title:'输入密码',
        skin:'layui-layer-rim',
        area:['80%', 'auto'],
        content: '<div class="input-group" style="width: 100%;text-align: center;">'
            // +'<textarea id="beizhu" style="width: 100%" class="form-control" ></textarea>'
            +'<input id="password2"  type="password" style="width: 91%;"/>'
            +'</div>'
        ,
        btn:['提交','取消'],
        btn1: function (index,layero) {
            // console.log(amount);return false;
            var password2 = $('#password2').val();
            $.post("__ACTION__",{
                amount:amount,
                from:from,
                password:password2,
                // to:to
                // mobile:mobile
            },function (data) {
                // layer.msg(data.msg,{time:1000},function () {
                //     if(data.code){
                //         return false;
                //     }else{
                //         window.location.reload();
                //     }
                // })
                if(data.code>0){
                    layer.msg(data.message,{time:3000},function(){
                        window.location.href="{:U('Finance/live')}";

                    });
                }
                else{
                    layer.msg(data.message,{time:3000});return false;
                }
            },'json')
        },
        btn2:function (index,layero) {
            layer.close(index);
        }

    });
});

// $("#btn-1").click(function(){
//
//
//     layer.confirm('确定存币吗？', {icon:3, title: "提示"},function () {
//         $.ajax({
//             type: 'POST',
//             url: "__ACTION__",
//             dataType: 'json',
//             data: {
//                 amount:amount,
//                 from:from,
//                 password:password,
//                 // to:to
//                 // mobile:mobile
//             },
//             success: function(data){
//                 if(data.code>0){
//                     layer.msg(data.message,{time:3000},function(){
//                         window.location.href="{:U('Finance/live')}";
//
//                     });
//                 }
//                 else{
//                     layer.msg(data.message,{time:3000});return false;
//                 }
//             }
//         })
//     });
//
// });

</script>